//
//  MLAHttpManage.h
//  MagicLampApp
//
//  Created by Zheng on 2018/12/25.
//  Copyright © 2018 zheng.magic.lamp.app. All rights reserved.
//

#import <Foundation/Foundation.h>


NS_ASSUME_NONNULL_BEGIN

static NSString *kAccessToken = @"access_token";
#define kGetToken [[NSUserDefaults standardUserDefaults] objectForKey:kAccessToken]

typedef NS_ENUM(NSUInteger, MLAHttpHostType) {
    MLAHttpHostType_Api,
    MLAHttpHostType_Shop,
};

typedef NS_ENUM(NSUInteger, MLAHttpRequestType) {
    MLAHttpRequestType_Get,
    MLAHttpRequestType_Post,
    MLAHttpRequestType_Put
};

static NSString *kBase_URL = @"http://cms.chinacampus.org";
static NSString *kShoping_URL = @"http://api.chinacampus.org";
static NSString *kApi_Key = @"6de9cc05-6c46-4e29-84f3-a638e442465a";

@interface MLAHttpManage : NSObject

+ (instancetype)defaultManager;

+ (NSURLSessionDataTask *)postHttpType:(MLAHttpRequestType)rType hostType:(MLAHttpHostType)type api:(NSString *)api params:(nullable id)params success:(void(^)(id response,NSString *msg))success failure:(void(^)(void))failure;


@end

NS_ASSUME_NONNULL_END
